﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MainSite.Master" AutoEventWireup="true" CodeBehind="AssignEvaluationOLD.aspx.cs" Inherits="BSCMFF.Web.Pages.Evaluation_Setup.AssignEvaluation" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="200px" Width="300px">
    
    <telerik:RadComboBox ID="RadComboBoxEvaluations" runat="server" 
        DataSourceID="EntityDataSourceEvaluations" DataTextField="Name" 
        DataValueField="ID"
        DropDownWidth="300" Width="250"
        AppendDataBoundItems="true" 
            onselectedindexchanged="RadComboBoxEvaluations_SelectedIndexChanged"
            EmptyMessage="Select Evaluation">
        <%--<Items>
            <telerik:RadComboBoxItem Text=". . ." runat="server" Value="0" />
        </Items>--%>
        <HeaderTemplate>
            <table style="width: 275px" cellspacing="0" cellpadding="0">
                <tr>
                    <td style="width:200px; padding-right:10px">
                        <asp:Label ID="LabelName" runat="server" Text="Name" ></asp:Label>
                    </td>
                    <td >
                        <asp:Label ID="LabelStartDate" runat="server" Text="Start Date" ></asp:Label>
                    </td>
                </tr>
             </table>
        </HeaderTemplate>
        <ItemTemplate>
            <table>
                <tr>
                    <td style="width:200px; padding-right:10px">
                        <%# Eval("Name")%>
                    </td>
            
                    <td>
                        <%# Eval("StartDate")%>
                    </td>
                </tr>
            </table>
        </ItemTemplate>
    </telerik:RadComboBox>

    <asp:CheckBox ID="CheckBoxOmitFinished" runat="server" Checked="true" AutoPostBack="true"/>

    <br />

    <bsc:EmployeeGroupSelection ID="EGS" runat="server" />

    <br />
        <telerik:RadGrid ID="RadGridAssignedEmployees" runat="server" AutoGenerateColumns="false" 
            >
            <MasterTableView DataKeyNames="ID">
                <Columns>                   
                    <telerik:GridBoundColumn DataField="Firstname" 
                        FilterControlAltText="Filter Firstname column" HeaderText="Firstname" 
                        SortExpression="Firstname" UniqueName="Firstname">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Lastname" 
                        FilterControlAltText="Filter Lastname column" HeaderText="Lastname" 
                        SortExpression="Lastname" UniqueName="Lastname">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Email" 
                        FilterControlAltText="Filter Email column" HeaderText="Email" 
                        SortExpression="Email" UniqueName="Email">
                    </telerik:GridBoundColumn>
                    
                    
                    <telerik:GridBoundColumn DataField="EmployeeID" 
                        FilterControlAltText="Filter EmployeeID column" HeaderText="EmployeeID" 
                        SortExpression="EmployeeID" UniqueName="EmployeeID">
                    </telerik:GridBoundColumn>
                    
                    <telerik:GridBoundColumn DataField="SBU.Name" HeaderText="SBU" 
                        SortExpression="SBU.Name" UniqueName="SBU.Name">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Job_Position" 
                        FilterControlAltText="Filter Job_Position column" HeaderText="Job_Position" 
                        SortExpression="Job_Position" UniqueName="Job_Position">
                    </telerik:GridBoundColumn>

                    <telerik:GridTemplateColumn>
                        <HeaderTemplate>
                            <asp:Label ID="HeaderEvaluator" runat="server" Text="Evaluator" ></asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <bsc:EmployeeSelection ID="es" runat="server" SelectedUserID='<%# Eval("Manager_FK") %>' /> <%-- '<%# Eval("ID") %>'--%>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>

                    <telerik:GridButtonColumn CommandName="Select" Text="Select" 
                        UniqueName="column">
                    </telerik:GridButtonColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>

        <br /><br />

        <telerik:RadButton ID="RadButtonAssignUsers" runat="server" OnClick="RadButtonAssignUsers_Click" ></telerik:RadButton>

    </telerik:RadAjaxPanel>

    <asp:EntityDataSource ID="EntityDataSourceEvaluations" runat="server" 
        ConnectionString="name=BSCEntities" DefaultContainerName="BSCEntities" 
        EnableFlattening="False" EntitySetName="Evaluation_Period" 
        Select="it.[ID], it.[Name], it.[StartDate]">
    </asp:EntityDataSource>

</asp:Content>